package com.example.leetdemo.finash;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class Solution2270 {

    public int waysToSplitArray(int[] nums) {
        long sum = 0;
        for (int i = 0; i < nums.length; i++) {
            sum += nums[i];
        }
        long temp = 0;
        int ways = 0;
        for (int i = 0; i < nums.length - 1; i++) {
            temp += nums[i];
            if (temp >= sum - temp) {
                ways++;
            }
        }
        return ways;
    }


    public static void main(String[] args) {
        List<String> list = new ArrayList<String>();
        list.add("00:01");
        try {
            while (!list.isEmpty()) {
                System.err.println(0);
                Thread.sleep(10000);
            }
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
